<div class="admin_right_top"><span style="float:left"><{$lang.pro_cat_list}></span></div>

<div>
<script>
function option(id)
{
	if($('subcat'+id).style.display=='none')
	{
		$('opt_text'+id).innerHTML="[-]";
		$('subcat'+id).style.display='block';
	}
	else
	{
		$('opt_text'+id).innerHTML="[+]";
		$('subcat'+id).style.display='none';

	}
}
</script>
<form action="" method="post">
<table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" class="admin_table">
	<tr bgcolor="#E8E8E8" style="font-weight:bold;">
      <td bgcolor="#EDF8FE" style="padding-left:30px;">
	  <span><{$lang.order}></span>
	  <span style="padding-left:14px;"><{$lang.pro_cat_name}></span>
	  </td>
    </tr>
	<{foreach item=list key=num from=$re}>
	<tr>
	  <td valign="top" bgcolor="#F4F4F4" style="padding-left:10px;">
		  <span><img src="image/default/user_admin/icon.jpg" /></span>
		  <span><input name="nums[]" value="<{$list.nums}>" type="text" style="width:40px;" maxlength="2" /></span>
		  <span><input style="width:300px;" value="<{$list.name}>" type="text" name="name[]" /></span>
		  <span><input name="cid[]" type="hidden" value="<{$list.id}>" /></span>
		  <a href="?action=m&m=product&s=admin_product_cat&menu=<{$smarty.get.menu}>&deid=<{$list.id}>">
		  <img src="image/default/user_admin/jian.png" />
		  </a>
		  <a id="opt_text<{$num}>" href="javascript:option('<{$num}>');">
		  <img src="image/default/user_admin/jia.png" />
		  </a>
		</td>
	  </tr>
	
	<tr>
      <td valign="top">
		  <{foreach item=slist from=$list.subcat}>
		  	<div style="width:100%; padding-left:54px; float:left; margin:2px;">
			 <img src="image/default/user_admin/icon2.jpg" />
			  <input name="snums[]" value="<{$slist.nums}>" type="text" style="width:40px;" maxlength="2" />
			  <input style="width:258px;" value="<{$slist.name}>" type="text" name="sname[]" />
			  <input name="scid[]" type="hidden" value="<{$slist.id}>" />
			  <a href="?action=m&m=product&s=admin_product_cat&menu=<{$smarty.get.menu}>&deid=<{$slist.id}>">
			  <img src="image/default/user_admin/jian.png" />
			  </a>
			  </div>
		  <{/foreach}>
		  
		  <div style="display:none; width:100%; padding-left:54px;" id="subcat<{$num}>">
		  <img src="image/default/user_admin/icon2.jpg" />
		  <input name="addsnums[]" value="" type="text" style="width:40px;" maxlength="2" />
		  <input style="width:258px;" value="" type="text" name="addsname[]" />
		  <input name="pid[]" type="hidden" value="<{$list.id}>" />
		  </div>
	  </td>
      </tr>
	<{/foreach}>
    <tr>
      <td style="border-top:dashed 1px #CCCCCC;" valign="top">
	  <{$lang.newadd}><input name="nums[]" type="text" value="0" style="width:40px;" maxlength="2" />
	  <input style="width:302px;" type="text" name="name[]" />
	  </td>
      </tr>
    <tr>
	    <td valign="top">
	    <input type="submit" name="button" id="button" value="<{$lang.submit}>" />
	    <input name="action" type="hidden" id="action" value="submit" />
		</td>
    </tr>
  </table>
</form>
</div>